// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class PV1 : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Set ID - Patient Visit",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"SI")]
	    public SI SetIDPatientVisit {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Patient Class",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.False, HL7Required.True,"CWE")]
		[PatientClass]
	    public CWE PatientClass {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Assigned Patient Location",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.False, HL7Required.True,"PL")]
	    public PL AssignedPatientLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Admission Type",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"CWE")]
		[AdmissionType]
	    public CWE AdmissionType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Preadmit Number",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.False, HL7Required.True,"CX")]
	    public CX PreadmitNumber {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Prior Patient Location",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"PL")]
	    public PL PriorPatientLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Attending Doctor",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.True, HL7Required.True,"XCN")]
		[PhysicianID]
	    public XCN[] AttendingDoctor {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Referring Doctor",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.True, HL7Required.True,"XCN")]
		[PhysicianID]
	    public XCN[] ReferringDoctor {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Consulting Doctor",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.True, HL7Required.True,"XCN")]
	    public XCN[] ConsultingDoctor {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Hospital Service",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"CWE")]
		[HospitalService]
	    public CWE HospitalService {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Temporary Location",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.False, HL7Required.True,"PL")]
	    public PL TemporaryLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Preadmit Test Indicator",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"CWE")]
		[PreAdmitTestIndicator]
	    public CWE PreadmitTestIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Re-admission Indicator",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.False, HL7Required.True,"CWE")]
		[ReAdmissionIndicator]
	    public CWE ReadmissionIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Admit Source",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.False, HL7Required.True,"CWE")]
		[AdmitSource]
	    public CWE AdmitSource {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Ambulatory Status",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.True, HL7Required.True,"CWE")]
		[AmbulatoryStatus]
	    public CWE[] AmbulatoryStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 VIP Indicator",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.False, HL7Required.True,"CWE")]
		[VIPIndicator]
	    public CWE VIPIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Admitting Doctor",17)]
  	    [HL7Field(HL7Version.v23, 17, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 17, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.True, HL7Required.True,"XCN")]
		[PhysicianID]
	    public XCN[] AdmittingDoctor {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Patient Type",18)]
  	    [HL7Field(HL7Version.v23, 18, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 18, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.False, HL7Required.True,"CWE")]
		[PatientType]
	    public CWE PatientType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Visit Number",19)]
  	    [HL7Field(HL7Version.v23, 19, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 19, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.False, HL7Required.True,"CX")]
	    public CX VisitNumber {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Financial Class",20)]
  	    [HL7Field(HL7Version.v23, 20, HL7Repeat.True, HL7Required.True,"FC")]
  	    [HL7Field(HL7Version.v231, 20, HL7Repeat.True, HL7Required.True,"FC")]
  	    [HL7Field(HL7Version.v24, 20, HL7Repeat.True, HL7Required.True,"FC")]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.True, HL7Required.True,"FC")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.True, HL7Required.True,"FC")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.True, HL7Required.True,"FC")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.True, HL7Required.True,"FC")]
		[FinancialClass]
	    public FC[] FinancialClass {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Charge Price Indicator",21)]
  	    [HL7Field(HL7Version.v23, 21, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 21, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 21, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.False, HL7Required.True,"CWE")]
		[ChargePriceIndicator]
	    public CWE ChargePriceIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Courtesy Code",22)]
  	    [HL7Field(HL7Version.v23, 22, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"CWE")]
		[CourtesyCode]
	    public CWE CourtesyCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 Credit Rating",23)]
  	    [HL7Field(HL7Version.v23, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 23, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 23, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 23, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 23, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"CWE")]
		[CreditRating]
	    public CWE CreditRating {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 Contract Code",24)]
  	    [HL7Field(HL7Version.v23, 24, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 24, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 24, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 24, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 24, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.True, HL7Required.True,"CWE")]
		[ContractCode]
	    public CWE[] ContractCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("25 Contract Effective Date",25)]
  	    [HL7Field(HL7Version.v23, 25, HL7Repeat.True, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v231, 25, HL7Repeat.True, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v24, 25, HL7Repeat.True, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v25, 25, HL7Repeat.True, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v251, 25, HL7Repeat.True, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v26, 25, HL7Repeat.True, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v27, 25, HL7Repeat.True, HL7Required.True,"DT")]
	    public DT[] ContractEffectiveDate {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("26 Contract Amount",26)]
  	    [HL7Field(HL7Version.v23, 26, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 26, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 26, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 26, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 26, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 26, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 26, HL7Repeat.True, HL7Required.True,"NM")]
	    public NM[] ContractAmount {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("27 Contract Period",27)]
  	    [HL7Field(HL7Version.v23, 27, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 27, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 27, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 27, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 27, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 27, HL7Repeat.True, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 27, HL7Repeat.True, HL7Required.True,"NM")]
	    public NM[] ContractPeriod {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("28 Interest Code",28)]
  	    [HL7Field(HL7Version.v23, 28, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 28, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 28, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 28, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 28, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 28, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 28, HL7Repeat.False, HL7Required.True,"CWE")]
		[InterestRateCode]
	    public CWE InterestCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("29 Transfer to Bad Debt Code",29)]
  	    [HL7Field(HL7Version.v23, 29, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 29, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 29, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 29, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 29, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 29, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 29, HL7Repeat.False, HL7Required.True,"CWE")]
		[TransfertoBadDebtCode]
	    public CWE TransfertoBadDebtCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("30 Transfer to Bad Debt Date",30)]
  	    [HL7Field(HL7Version.v23, 30, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v231, 30, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v24, 30, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v25, 30, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v251, 30, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v26, 30, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v27, 30, HL7Repeat.False, HL7Required.True,"DT")]
	    public DT TransfertoBadDebtDate {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("31 Bad Debt Agency Code",31)]
  	    [HL7Field(HL7Version.v23, 31, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 31, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 31, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 31, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 31, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 31, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 31, HL7Repeat.False, HL7Required.True,"CWE")]
		[BadDebtAgencyCode]
	    public CWE BadDebtAgencyCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("32 Bad Debt Transfer Amount",32)]
  	    [HL7Field(HL7Version.v23, 32, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 32, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 32, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 32, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 32, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 32, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 32, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM BadDebtTransferAmount {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("33 Bad Debt Recovery Amount",33)]
  	    [HL7Field(HL7Version.v23, 33, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 33, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 33, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 33, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 33, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 33, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 33, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM BadDebtRecoveryAmount {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("34 Delete Account Indicator",34)]
  	    [HL7Field(HL7Version.v23, 34, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 34, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 34, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 34, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 34, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 34, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 34, HL7Repeat.False, HL7Required.True,"CWE")]
		[DeleteAccountCode]
	    public CWE DeleteAccountIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("35 Delete Account Date",35)]
  	    [HL7Field(HL7Version.v23, 35, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v231, 35, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v24, 35, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v25, 35, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v251, 35, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v26, 35, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v27, 35, HL7Repeat.False, HL7Required.True,"DT")]
	    public DT DeleteAccountDate {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("36 Discharge Disposition",36)]
  	    [HL7Field(HL7Version.v23, 36, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 36, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 36, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 36, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 36, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 36, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 36, HL7Repeat.False, HL7Required.True,"CWE")]
		[DischargeDisposition]
	    public CWE DischargeDisposition {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("37 Discharged to Location",37)]
  	    [HL7Field(HL7Version.v23, 37, HL7Repeat.False, HL7Required.True,"CM_DLD")]
  	    [HL7Field(HL7Version.v231, 37, HL7Repeat.False, HL7Required.True,"DLD")]
  	    [HL7Field(HL7Version.v24, 37, HL7Repeat.False, HL7Required.True,"DLD")]
  	    [HL7Field(HL7Version.v25, 37, HL7Repeat.False, HL7Required.True,"DLD")]
  	    [HL7Field(HL7Version.v251, 37, HL7Repeat.False, HL7Required.True,"DLD")]
  	    [HL7Field(HL7Version.v26, 37, HL7Repeat.False, HL7Required.True,"DLD")]
  	    [HL7Field(HL7Version.v27, 37, HL7Repeat.False, HL7Required.True,"DLD")]
		[DischargedtoLocation]
	    public DLD DischargedtoLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("38 Diet Type",38)]
  	    [HL7Field(HL7Version.v23, 38, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 38, HL7Repeat.False, HL7Required.True,"CE_0114")]
  	    [HL7Field(HL7Version.v24, 38, HL7Repeat.False, HL7Required.True,"CE_0114")]
  	    [HL7Field(HL7Version.v25, 38, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 38, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 38, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 38, HL7Repeat.False, HL7Required.True,"CWE")]
		[DietType]
	    public CWE DietType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("39 Servicing Facility",39)]
  	    [HL7Field(HL7Version.v23, 39, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 39, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 39, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 39, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 39, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 39, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 39, HL7Repeat.False, HL7Required.True,"CWE")]
		[ServicingFacility]
	    public CWE ServicingFacility {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("40 Bed Status",40)]
  	    [HL7Field(HL7Version.v23, 40, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 40, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 40, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 40, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 40, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 40, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 40, HL7Repeat.False, HL7Required.True,"CWE")]
		[BedStatus]
	    public CWE BedStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("41 Account Status",41)]
  	    [HL7Field(HL7Version.v23, 41, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 41, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 41, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 41, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 41, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 41, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 41, HL7Repeat.False, HL7Required.True,"CWE")]
		[AccountStatus]
	    public CWE AccountStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("42 Pending Location",42)]
  	    [HL7Field(HL7Version.v23, 42, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v231, 42, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v24, 42, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v25, 42, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v251, 42, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v26, 42, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v27, 42, HL7Repeat.False, HL7Required.True,"PL")]
	    public PL PendingLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("43 Prior Temporary Location",43)]
  	    [HL7Field(HL7Version.v23, 43, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v231, 43, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v24, 43, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v25, 43, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v251, 43, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v26, 43, HL7Repeat.False, HL7Required.True,"PL")]
  	    [HL7Field(HL7Version.v27, 43, HL7Repeat.False, HL7Required.True,"PL")]
	    public PL PriorTemporaryLocation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("44 Admit Date/Time",44)]
  	    [HL7Field(HL7Version.v23, 44, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 44, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 44, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 44, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 44, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 44, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 44, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM AdmitDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("45 Discharge Date/Time",45)]
  	    [HL7Field(HL7Version.v23, 45, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 45, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 45, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 45, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 45, HL7Repeat.True, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 45, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 45, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM[] DischargeDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("46 Current Patient Balance",46)]
  	    [HL7Field(HL7Version.v23, 46, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 46, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 46, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 46, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 46, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 46, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 46, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM CurrentPatientBalance {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("47 Total Charges",47)]
  	    [HL7Field(HL7Version.v23, 47, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 47, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 47, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 47, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 47, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 47, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 47, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM TotalCharges {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("48 Total Adjustments",48)]
  	    [HL7Field(HL7Version.v23, 48, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 48, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 48, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 48, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 48, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 48, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 48, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM TotalAdjustments {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("49 Total Payments",49)]
  	    [HL7Field(HL7Version.v23, 49, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 49, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 49, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 49, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 49, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 49, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 49, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM TotalPayments {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("50 Alternate Visit ID",50)]
  	    [HL7Field(HL7Version.v23, 50, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v231, 50, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v24, 50, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v25, 50, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v251, 50, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v26, 50, HL7Repeat.False, HL7Required.True,"CX")]
  	    [HL7Field(HL7Version.v27, 50, HL7Repeat.False, HL7Required.True,"CX")]
		[IdentifierType]
	    public CX AlternateVisitID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("51 Visit Indicator",51)]
  	    [HL7Field(HL7Version.v23, 51, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 51, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 51, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 51, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 51, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 51, HL7Repeat.False, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v27, 51, HL7Repeat.False, HL7Required.True,"CWE")]
		[VisitIndicator]
	    public CWE VisitIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("52 Other Healthcare Provider",52)]
  	    [HL7Field(HL7Version.v23, 52, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v231, 52, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v24, 52, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v25, 52, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v251, 52, HL7Repeat.True, HL7Required.True,"XCN")]
  	    [HL7Field(HL7Version.v26, 52, HL7Repeat.True, HL7Required.True,"XCN")]
		[PhysicianID]
	    public XCN[] OtherHealthcareProvider {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("53 Service Episode Description",53)]
  	    [HL7Field(HL7Version.v27, 53, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST ServiceEpisodeDescription {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("54 Service Episode Identifier",54)]
  	    [HL7Field(HL7Version.v27, 54, HL7Repeat.False, HL7Required.True,"CX")]
	    public CX ServiceEpisodeIdentifier {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 55)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 56)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 57)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 58)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 59)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 60)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 61)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 62)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 63)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 64)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 65)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 66)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 67)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 68)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 69)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 70)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 71)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 72)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 73)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 74)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			SetIDPatientVisit = (SI)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(SI), "PV1.1");
			PatientClass = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(CWE), "PV1.2");
			AssignedPatientLocation = (PL)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(PL), "PV1.3");
			AdmissionType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(CWE), "PV1.4");
			PreadmitNumber = (CX)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(CX), "PV1.5");
			PriorPatientLocation = (PL)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(PL), "PV1.6");
	    	AttendingDoctor = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 7, options, "PV1.7");
	    	ReferringDoctor = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 8, options, "PV1.8");
	    	ConsultingDoctor = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 9, options, "PV1.9");
			HospitalService = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(CWE), "PV1.10");
			TemporaryLocation = (PL)ParseTextAtPositionIntoData(segmentTextParts, 11, options, typeof(PL), "PV1.11");
			PreadmitTestIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(CWE), "PV1.12");
			ReadmissionIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(CWE), "PV1.13");
			AdmitSource = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(CWE), "PV1.14");
	    	AmbulatoryStatus = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 15, options, "PV1.15");
			VIPIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 16, options, typeof(CWE), "PV1.16");
	    	AdmittingDoctor = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 17, options, "PV1.17");
			PatientType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(CWE), "PV1.18");
			VisitNumber = (CX)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(CX), "PV1.19");
	    	FinancialClass = (FC[])ParseTextAtPositionIntoDataArray<FC>(segmentTextParts, 20, options, "PV1.20");
			ChargePriceIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 21, options, typeof(CWE), "PV1.21");
			CourtesyCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(CWE), "PV1.22");
			CreditRating = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(CWE), "PV1.23");
	    	ContractCode = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 24, options, "PV1.24");
	    	ContractEffectiveDate = (DT[])ParseTextAtPositionIntoDataArray<DT>(segmentTextParts, 25, options, "PV1.25");
	    	ContractAmount = (NM[])ParseTextAtPositionIntoDataArray<NM>(segmentTextParts, 26, options, "PV1.26");
	    	ContractPeriod = (NM[])ParseTextAtPositionIntoDataArray<NM>(segmentTextParts, 27, options, "PV1.27");
			InterestCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 28, options, typeof(CWE), "PV1.28");
			TransfertoBadDebtCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 29, options, typeof(CWE), "PV1.29");
			TransfertoBadDebtDate = (DT)ParseTextAtPositionIntoData(segmentTextParts, 30, options, typeof(DT), "PV1.30");
			BadDebtAgencyCode = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 31, options, typeof(CWE), "PV1.31");
			BadDebtTransferAmount = (NM)ParseTextAtPositionIntoData(segmentTextParts, 32, options, typeof(NM), "PV1.32");
			BadDebtRecoveryAmount = (NM)ParseTextAtPositionIntoData(segmentTextParts, 33, options, typeof(NM), "PV1.33");
			DeleteAccountIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 34, options, typeof(CWE), "PV1.34");
			DeleteAccountDate = (DT)ParseTextAtPositionIntoData(segmentTextParts, 35, options, typeof(DT), "PV1.35");
			DischargeDisposition = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 36, options, typeof(CWE), "PV1.36");
			DischargedtoLocation = (DLD)ParseTextAtPositionIntoData(segmentTextParts, 37, options, typeof(DLD), "PV1.37");
			DietType = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 38, options, typeof(CWE), "PV1.38");
			ServicingFacility = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 39, options, typeof(CWE), "PV1.39");
			BedStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 40, options, typeof(CWE), "PV1.40");
			AccountStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 41, options, typeof(CWE), "PV1.41");
			PendingLocation = (PL)ParseTextAtPositionIntoData(segmentTextParts, 42, options, typeof(PL), "PV1.42");
			PriorTemporaryLocation = (PL)ParseTextAtPositionIntoData(segmentTextParts, 43, options, typeof(PL), "PV1.43");
			AdmitDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 44, options, typeof(DTM), "PV1.44");
	    	DischargeDateTime = (DTM[])ParseTextAtPositionIntoDataArray<DTM>(segmentTextParts, 45, options, "PV1.45");
			CurrentPatientBalance = (NM)ParseTextAtPositionIntoData(segmentTextParts, 46, options, typeof(NM), "PV1.46");
			TotalCharges = (NM)ParseTextAtPositionIntoData(segmentTextParts, 47, options, typeof(NM), "PV1.47");
			TotalAdjustments = (NM)ParseTextAtPositionIntoData(segmentTextParts, 48, options, typeof(NM), "PV1.48");
			TotalPayments = (NM)ParseTextAtPositionIntoData(segmentTextParts, 49, options, typeof(NM), "PV1.49");
			AlternateVisitID = (CX)ParseTextAtPositionIntoData(segmentTextParts, 50, options, typeof(CX), "PV1.50");
			VisitIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 51, options, typeof(CWE), "PV1.51");
	    	OtherHealthcareProvider = (XCN[])ParseTextAtPositionIntoDataArray<XCN>(segmentTextParts, 52, options, "PV1.52");
			ServiceEpisodeDescription = (ST)ParseTextAtPositionIntoData(segmentTextParts, 53, options, typeof(ST), "PV1.53");
			ServiceEpisodeIdentifier = (CX)ParseTextAtPositionIntoData(segmentTextParts, 54, options, typeof(CX), "PV1.54");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("PV1");
		    segmentParts.Add(SetIDPatientVisit);
			segmentParts.Add(GetER7TextForSegmentPart(PatientClass, options));
			segmentParts.Add(GetER7TextForSegmentPart(AssignedPatientLocation, options));
			segmentParts.Add(GetER7TextForSegmentPart(AdmissionType, options));
			segmentParts.Add(GetER7TextForSegmentPart(PreadmitNumber, options));
			segmentParts.Add(GetER7TextForSegmentPart(PriorPatientLocation, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(AttendingDoctor, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(ReferringDoctor, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(ConsultingDoctor, options));
			segmentParts.Add(GetER7TextForSegmentPart(HospitalService, options));
			segmentParts.Add(GetER7TextForSegmentPart(TemporaryLocation, options));
			segmentParts.Add(GetER7TextForSegmentPart(PreadmitTestIndicator, options));
			segmentParts.Add(GetER7TextForSegmentPart(ReadmissionIndicator, options));
			segmentParts.Add(GetER7TextForSegmentPart(AdmitSource, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(AmbulatoryStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(VIPIndicator, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(AdmittingDoctor, options));
			segmentParts.Add(GetER7TextForSegmentPart(PatientType, options));
			segmentParts.Add(GetER7TextForSegmentPart(VisitNumber, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(FinancialClass, options));
			segmentParts.Add(GetER7TextForSegmentPart(ChargePriceIndicator, options));
			segmentParts.Add(GetER7TextForSegmentPart(CourtesyCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(CreditRating, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(ContractCode, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(ContractEffectiveDate, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(ContractAmount, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(ContractPeriod, options));
			segmentParts.Add(GetER7TextForSegmentPart(InterestCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(TransfertoBadDebtCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(TransfertoBadDebtDate, options));
			segmentParts.Add(GetER7TextForSegmentPart(BadDebtAgencyCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(BadDebtTransferAmount, options));
			segmentParts.Add(GetER7TextForSegmentPart(BadDebtRecoveryAmount, options));
			segmentParts.Add(GetER7TextForSegmentPart(DeleteAccountIndicator, options));
			segmentParts.Add(GetER7TextForSegmentPart(DeleteAccountDate, options));
			segmentParts.Add(GetER7TextForSegmentPart(DischargeDisposition, options));
			segmentParts.Add(GetER7TextForSegmentPart(DischargedtoLocation, options));
			segmentParts.Add(GetER7TextForSegmentPart(DietType, options));
			segmentParts.Add(GetER7TextForSegmentPart(ServicingFacility, options));
			segmentParts.Add(GetER7TextForSegmentPart(BedStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(AccountStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(PendingLocation, options));
			segmentParts.Add(GetER7TextForSegmentPart(PriorTemporaryLocation, options));
			segmentParts.Add(GetER7TextForSegmentPart(AdmitDateTime, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(DischargeDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(CurrentPatientBalance, options));
			segmentParts.Add(GetER7TextForSegmentPart(TotalCharges, options));
			segmentParts.Add(GetER7TextForSegmentPart(TotalAdjustments, options));
			segmentParts.Add(GetER7TextForSegmentPart(TotalPayments, options));
			segmentParts.Add(GetER7TextForSegmentPart(AlternateVisitID, options));
			segmentParts.Add(GetER7TextForSegmentPart(VisitIndicator, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(OtherHealthcareProvider, options));
		    segmentParts.Add(ServiceEpisodeDescription);
			segmentParts.Add(GetER7TextForSegmentPart(ServiceEpisodeIdentifier, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

